<template>
  <div>
    <button @click=" divColor='blue' ">改行内样式-改蓝色</button>
    <button @click=" divColor='gold' ">改行内样式-改金色</button>
    <!--  :style="{css属性: 值}"  -->
    <div :style="{ 'background-color' : divColor }">
      盒子 {{ divColor }}
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      divColor: 'red'
    }
  }
}
</script>

<style>

</style>